package com.hongguan.oms.service.customer;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.hongguan.oms.service.BaseService;

@SuppressWarnings("unchecked")
@Service
public class CustomerService extends BaseService {

	public CustomerService() {
		this.namespace = "Customer";
	}
	public void updateCustomer(Map<String, Object> map){
		this.getSqlMapClientTemplate().insert(
				this.getStatementName("updateCustomer"), map);
	}
	
	public void addCustomer(Map<String, Object> map){
		this.getSqlMapClientTemplate().insert(
				this.getStatementName("addCustomer"), map);
		
	}
	

	public void chooseCustomer(Map<String, Object> map) {

		this.getSqlMapClientTemplate().insert(
				this.getStatementName("chooseCustomer"), map);

	}

	public List searchCustomerByPublic(Map<String, Object> map) {
		
		return this.getSqlMapClientTemplate().queryForList(
				this.getStatementName("searchCustomerByPublic"), map);
	}
	public List searchCustomerByPerson(Map<String, Object> map) {
		
		return this.getSqlMapClientTemplate().queryForList(
				this.getStatementName("searchCustomerByPerson"), map);
	}

}
